package com.TeacherInfoServer.pojo.DTO;

import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class UpdateTitleHistoryDTO {
    @NotNull(message = "id不能为null")
    private Integer id;
    @NotNull(message = "工号不能为null")
    @NotEmpty(message = "工号不能为空")
    @Size(min = 10, max = 10, message = "不是有效工号")
    private String teacherId;
    @NotNull(message = "职称级别不能为null")
    @NotEmpty(message = "职称级别不能为空")
    private String titleLevel;
    @NotNull(message = "获得时间不能为null")
    @NotEmpty(message = "获得时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "时间不合法")
    private String obtainDate;
}
